# Ansible Managed: Backup job for {{ inventory_hostname }}
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

{{ backup_cron_minute }} {{ backup_cron_hour }} * * * root /usr/bin/rsync -az --delete --partial --rsync-path="mkdir -p {{ backup_dest_dir }} && rsync" -e "ssh -o StrictHostKeyChecking=no" {{ backup_src_dir }}/ {{ backup_dest_user }}@{{ backup_dest_host }}:{{ backup_dest_dir }}/$(hostname -s)/ 2>&1 | logger -t rsync-backup
